Usually, there is a laser diode that is optically coupled to the
fiber.
View page
A GLC-SX-MM is an optical Small Form Pluggable (SFP) Gigabit
Multimode SX Optical transceiver for Cisco switches. It can support
up to 1km over laser-optimized 50 μm multimode fiber cable.
View page
The laser shines through the fiber optic cable because the edge
of the inside of the cable can act as a mirror. This is called
internal reflection.